package com.dimples.dd.system.api.fallback.user;

import com.dimples.dd.common.model.DDAuthUser;
import com.dimples.dd.system.api.user.UserFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 系统用户服务远程调用异常后的降级处理类
 *
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2024/6/13
 */
@Component
@Slf4j
public class UserFeignFallbackClient implements UserFeignClient {

    @Override
    public DDAuthUser getUserAuthUser(String username) {
        log.error("feign远程调用系统用户服务异常后的降级方法");
        return new DDAuthUser();
    }

    @Override
    public void updateUserLogin(Long userId, String loginIp) {
        log.error("更新用户最后登录时间");
    }
}
